<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>健康档案详情</title>

    <link rel="stylesheet" href="../css/page-health-recordDetail.css"/>
</head>
<link rel="stylesheet" href="../css/page-health-orderInfo.css"/>
<link rel="stylesheet" href="../plugins/elementui/index.css"/>
<script src="../plugins/jquery/dist/jquery.min.js"></script>
<script src="../plugins/healthmobile.js"></script>
<script src="../plugins/datapicker/datePicker.js"></script>
<script src="../plugins/vue/vue.js"></script>
<script src="../plugins/vue/axios-0.18.0.js"></script>
<script src="../plugins/elementui/index.js"></script>
<script>
    var telephone = getUrlParam("telephone");
</script>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div id="app" class="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="list-content">
            <div class="fix-info">
                <ul class="list-unstyled ">
                    <li><span class="tit">档案号</span><span class="info"><h2 class="tit">{{member.id}}</h2></span></li>
                    <li><span class="tit">姓名</span><span class="info"><h2 class="tit">{{member.name}}</h2></span></li>
                    <li><span class="tit">性别</span><span class="info"><h2 class="tit">{{member.sex | showGender}}</h2></span></li>
                    <li><span class="tit">身份证号</span><span class="info"><h2 class="tit">{{member.idCard}}</h2></span></li>
                    <li><span class="tit">手机号</span><span class="info"><h2 class="tit">{{member.phoneNumber}}</h2></span></li>
                </ul>
            </div>
        </div>
    </div>

</div>

</body>
<script>
    var vue = new Vue({
        el:'#app',
        data:{
            member:{}
        },
        filters: {
            showGender(value) {
                switch (value * 1) {
                    case 0:
                        return '性别不限';
                    case 1:
                        return '男';
                    default:
                        return '女';
                }
            }
        },
        methods:{
        },
        mounted(){
            axios.get("/information/findTelephone.do?telephone=" + telephone).then((response) => {
                if (response.data.flag) {
                    this.member = response.data.data;
                } else {
                    this.$message({
                        message: response.data.message,
                        type: 'error'
                    });
                }
            });
        }
    });
</script>
